import request from '@/utils/request'

// 查询通知中心列表
export function listCenter(query) {
  return request({
    url: '/center/center/list',
    method: 'get',
    params: query
  })
}

// 查询通知中心详细
export function getCenter(id) {
  return request({
    url: '/center/center/' + id,
    method: 'get'
  })
}


export function listStatics() {
  return request({
    url: '/center/center/listStatics',
    method: 'post'
  })
}

// 新增通知中心
export function addCenter(data) {
  return request({
    url: '/center/center',
    method: 'post',
    data: data
  })
}

// 修改通知中心
export function updateCenter(data) {
  return request({
    url: '/center/center',
    method: 'put',
    data: data
  })
}

// 删除通知中心
export function delCenter(id) {
  return request({
    url: '/center/center/' + id,
    method: 'delete'
  })
}

// 设置全部已读
export function setAllRead() {
  return request({
    url:'/center/center/allAlreadRead',
    method: 'post'
  })
}
